<?php
/* @var $this ParticipantController */
/* @var $model Participant */
/* @var $form  CActiveForm*/

?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'participant-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>true,
        'htmlOptions' => array('enctype' => 'multipart/form-data'),
)); ?>

	<p class="note">Campos com <span class="required">*</span> são obrigatórios.</p>

	<?php echo $form->errorSummary($model); ?>

        <?php if($model->isNewRecord!='1'): ?>
            <div class="row">
                 <?php echo CHtml::image(Yii::app()->request->baseUrl.'/photos/'.$model->image,"image",array("width"=>50)); // Image shown here if page is update page?>  
            </div>
        <?php endif;  ?>
        
	<div class="row">
            
                <?php echo $form->labelEx($model,'image'); ?>
                <?php echo $form->fileField($model, 'image'); ?> 
                <?php echo $form->error($model,'image'); ?>
            <?php /*
		<?php echo $form->labelEx($model,'image'); ?>
		<?php echo $form->textArea($model,'image',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'image'); ?> 
             */ ?>
             
	</div>

        <div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textArea($model,'name',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>
        
	<div class="row">
		<?php echo $form->labelEx($model,'description'); ?>
		<?php echo $form->textArea($model,'description',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'description'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'position'); ?>
		<?php echo $form->textArea($model,'position',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'position'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'age'); ?>
		<?php echo $form->textField($model,'age'); ?>
		<?php echo $form->error($model,'age'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'formation'); ?>
		<?php echo $form->textArea($model,'formation',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'formation'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'nationality'); ?>
		<?php echo $form->textArea($model,'nationality',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'nationality'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'branche'); ?>
		<?php echo $form->textArea($model,'branche',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'branche'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sector'); ?>
		<?php echo $form->textArea($model,'sector',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'sector'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'location'); ?>
		<?php echo $form->textArea($model,'location',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'location'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
		<?php echo $form->listBox($model, 'type', array('P'=>'Participante', 'C'=>'Candidato'),array('size'=>1)); ?>
		<?php echo $form->error($model,'type'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->